# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-moosex-types
_pkgreal=MooseX-Types
pkgver=0.50
pkgrel=2
pkgdesc="Organise your Moose types in libraries"
url="https://metacpan.org/release/MooseX-Types/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl-carp-clan perl-sub-install perl-moose perl-sub-exporter-formethods
	perl-namespace-autoclean perl-module-runtime perl-sub-name perl-sub-exporter"
checkdepends="perl-test-requires perl-test-fatal"
makedepends="perl-devel-overloadinfo perl-module-build-tiny perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/MooseX-Types-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL --installdirs=vendor
	./Build
}

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="42606b1caeb6423acaaa9288239c63512f398a2fba45492443d3e003c6ae3e93cbd8ea2631d487e428ea7d25b63744e4c2096a1e53012e262c99ff4b0c29484b  MooseX-Types-0.50.tar.gz"
